package com.hillerscopy.model;

/**
 * Created by Igor.Leonov
 * Date: 4/12/12
 * Time: 4:30 AM
 */
public class Coupon {
    
    private Long id;
    private String title;
    private int initialPrice;
    private int discountedPrice;
    private boolean isClipped;

    public Coupon() {
    }

    public Coupon(Long id, String title, int initialPrice, int discountedPrice) {
        this.id = id;
        this.title = title;
        this.initialPrice = initialPrice;
        this.discountedPrice = discountedPrice;
    }
    
//        return Math.round((initialPrice-discountedPrice)/initialPrice*100);

    public long getDiscountPercent() {
        return Math.round((float)(initialPrice-discountedPrice)/initialPrice*100);
    }

    public void setDiscountPercent(int discountPercent) {

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getInitialPrice() {
        return initialPrice;
    }

    public void setInitialPrice(int initialPrice) {
        this.initialPrice = initialPrice;
    }

    public int getDiscountedPrice() {
        return discountedPrice;
    }

    public void setDiscountedPrice(int discountedPrice) {
        this.discountedPrice = discountedPrice;
    }

    public boolean isClipped() {
        return isClipped;
    }

    public void setClipped(boolean clipped) {
        isClipped = clipped;
    }
}
